package concurrent.thread_create;

import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ForkJoinPool;

public class UseForkJoinPool {
    public static void main(String[] args) {
        ForkJoinPool forkJoinPool = new ForkJoinPool();
        forkJoinPool.execute(()->{
            System.out.println("10A......");
        });

        //parallelStream并行流，默认就基于ForkJoin实现
        List<String> list = Arrays.asList("10B......");
        list.parallelStream().forEach(System.out::println);
    }
}
